#!/bin/bash
# Copyright © 2021-2024 Jeffrey Cliff
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

PATH=$PATH:/home/themusicgod1/tools
BASEDIR=/mnt/disk
DATABASE=/home/themusicgod1/TDL/urls.db
DATESTRING=`date +"%m%d"`
HOME=/home/themusicgod1
date
SELECTSTRING="select url from news where level"
RANDOMME="order by random() limit 1"

# maximum: 550 (+ 55 550) = 605

# MAX 141 NOT 150...
# -1 for sktfm
# -1 for TURBORETARD
# -3 for sherri
# -2 for dad
# -2 for mom

# as of jan 15 2025

/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 560 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 559 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 558 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 557 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 556 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 555 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 554 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 553 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 552 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 551 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 550 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 549 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 548 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 547 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 546 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 545 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 544 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 543 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 542 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 541 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 540 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 539 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 538 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 537 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 536 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 535 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 534 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 533 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 532 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 531 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 530 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 529 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 528 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 527 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 526 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 525 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 524 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 523 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 522 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 521 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 520 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 519 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 518 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 517 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 516 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 515 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 514 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 513 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 512 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 511 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 510 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 509 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 508 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 507 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 506 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 505 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 504 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 503 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 502 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 501 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 500 order by random() limit 1" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 300 order by random() limit 180" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 200 order by random() limit 100" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 100 order by random() limit 110" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 40 order by random() limit 61" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "SELECT URL FROM NEWS WHERE LEVEL > 1 order by random() limit 40" | awk -F' ' '{print $3}'
/usr/bin/sqlite3 -line $DATABASE "select url from news order by random() limit 1" | awk -F' ' '{print $3}'

